#ifndef _PVMLOG_H_
#define _PVMLOG_H_

#if defined(_DEBUG) && !defined(PVM_LOG_DISABLE)
# define PVM_LOG_ENABLED
#endif

#include "pvm/pvmloggingapi.h"

enum PVM_LOG_CONSTS
{
	PVM_LOG_MAX_STRING_LENGTH = 1024
};

void PVMLogInit();
void PVMLogWrite(const pvm_char* logSourceFileWithLine, enum PVMLOG_COMPONENT component, enum PVMLOG_EVENT_TYPE logType, const pvm_char* logStringWithFormat, ...);

//_PVM_FILE_WITH_LINE_

#if defined(PVM_LOG_ENABLED)
#	if defined(__GNUC__)
#		define PVM_LOG(component, type, str, args...) (PVMLogWrite(_PVM_FILE_WITH_LINE_, component, type, str, #args))
#	else
#		define PVM_LOG(component, type, str, ...) (PVMLogWrite(_PVM_FILE_WITH_LINE_, component, type, str, __VA_ARGS__))
#	endif
#else
#	define PVM_LOG(component, type, str, ...) ((void)0)
#endif

#endif